﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SCMS.Model;

namespace SCMS.CoreBusinessLogic.ExpenseClaim
{
    public interface IExpenseClaimService
    {
        bool SaveExpenseClaimItem(Model.ExpenseItem ExpsItemEntity);
        string GenerateUniquNumber(CountryProgramme cp);
        List<Model.ExpenseItem> GetExpenseItems(Guid ExpsClaimId);
        List<ExpenseRequest> GetExpenseClaimsForReview(SystemUser currentUser);
        List<ExpenseRequest> GetExpenseClaimsForAuth(SystemUser currentUser);
        List<ExpenseRequest> GetExpenseClaimsForPosting(Guid countryProgId, SystemUser currentUser);
        ExpenseRequest GetExpenseClaimById(Guid Id);
        ExpenseItem GetExpenseItemById(Guid Id);
        List<AccountCode> GetAccountCodes(Guid countryProgId);
        bool SaveECF(ExpenseRequest ecf);
        bool SaveApprovedECF(ExpenseRequest ecf);
        bool SaveApprovedECFItem(ExpenseItem ecfItem);
        bool CommitFunds(ExpenseRequest ecf);
        bool EffectPosting(ExpenseRequest ecf, Staff poster);

        bool DeleteECF(Guid id);
        bool DeleteECFItem(Guid id);
        // <summary>
        /// Send notification to requestor and project managers of the affected budget lines
        /// </summary>
        /// <param name="rfa"></param>
        void NotifyAffected(ExpenseRequest ecf);
        List<BudgetCheckResult> RunFundsAvailableCheck(Guid ecfId);
    }
}
